﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="RuleSet"
    targetNamespace="http://BVMF.Sinacor.Schemas/RuleSet.xsd"
    elementFormDefault="qualified"
    xmlns="http://BVMF.Sinacor.Schemas/RuleSet.xsd"
    xmlns:mstns="http://BVMF.Sinacor.Schemas/RuleSet.xsd"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
>
  <xs:element name="RuleSets">
    <xs:complexType>
      <xs:sequence minOccurs="1" maxOccurs="unbounded">
        <xs:element name="RuleSet" type="TRuleSet" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="TRuleSet">
    <xs:sequence>
      <xs:element name="Name" type="xs:string" />
      <xs:element name="Parameters" minOccurs="0" nillable="true">
        <xs:complexType>
          <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element name="Parameter" type="TParameter" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="TParameter">
    <xs:sequence>
      <xs:element name="Name" type="xs:string" />
      <xs:element name="Type" type="mstns:STParameterType" />
      <xs:element name="IsRequired" type="xs:boolean" />
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name="STParameterType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="String" />
      <xs:enumeration value="Boolean" />
      <xs:enumeration value="Numeric" />
      <xs:enumeration value="ComparisonType" />
    </xs:restriction>
  </xs:simpleType>
  
</xs:schema>
